Temparory and permanent store procedure

What are temparory /permannent Stored Procedure:

 

     1. In Sql server we can create local and globle temporary store procedure.

  1. SQL Server enables you to create Local and global temporary stored procedures.

  2. Temporary stored procedures are similar to temporary tables in that they can be created with the # and ## prefixes added to the procedure name.
     
  3. The # prefix denotes a local temporary stored procedure
  4. ## denotes a global temporary stored procedure
     
  5. A local temporary stored procedure can be executed only by the connection that created it, and
    The procedure is automatically deleted when the connection is closed.
     
  6. A global temporary stored procedure can be accessed by multiple connections and exists until the connection used by the user who created the procedure is closed and any currently executing versions Of the procedure by any other connections are completed.
     
  7. If a stored procedure not prefixed with # or ## is created directly in the temp db database,
    The stored procedure exists until SQL Server is shut down.